home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Freelog 117
/
FreelogNo117-OctobreNovembre2013.iso
/
Programmation
/
jedit
/
jedit5.1.0install.exe
/
{app}
/
macros
/
Emacs
/
Emacs_Upcase_Word.bsh
< prev
next >
Wrap
Text File
|
2013-07-28
|
574b
|
24 lines
/**
* Convert the portion of the current word to upper case, starting at the
* caret and moving to the end of the word. Emulates the Emacs "upcase-word"
* function.
*/
source (MiscUtilities.constructPath(dirname(scriptPath), "EmacsUtil.bsh"));
void emacsUpcaseWord()
{
caret = eatNonAlphanums();
textArea.goToNextWord (false);
endOfWord = textArea.getCaretPosition();
textArea.setCaretPosition (caret);
selection = new Selection.Range (caret, endOfWord);
textArea.setSelection (selection);
textArea.toUpperCase();
}
emacsUpcaseWord();